﻿<!DOCTYPE html>
<html lang="en">
<#include "../common/common-head.html"/>
<body class="gray-bg top-navigation">
<div id="wrapper">
    <div id="page-wrapper" class="gray-bg">
    <#include "../common/common-menu.html">
        <div class="wrapper wrapper-content">
            <div class="row white-bg" style="padding: 18px 0">
                <div class="col-xs-12">

                    <div class="table-responsive">
                        <table class="table table-striped table-bordered table-hover">
                            <thead>
                            <tr>
                                <@tableHead names=["预约居民","预约医生","预约开始时间","预约结束时间","备注","标记","操作"]></@tableHead>
                            </tr>
                            </thead>
                            <tbody>
                            <#list pageInfo.list as item>
                            <tr>
                                <@tableBody model=item propMap={"username":"","doctorname":"","startdate":"","enddate":"","remark":"","flag":""}></@tableBody>
                                <td>
                                    <#if item.flag!?length == 0>
                                        <a onclick="update2('${item.id}')">标记</a>
                                    </#if>

                                    <a href="#" onclick="if(confirm('确定删除吗？')){location.href='${basePath}/orders/del/${item.id}'}">删除</a>

                                </td>
                            </tr>
                            </#list>
                            </tbody>
                        </table>
                    <#include "../common/table-page.html"/>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<div class="modal fade" tabindex="-1" role="dialog" id="model2">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">标记预约</h4>
            </div>
            <form action="/orders/update" method="post">

                <div class="modal-body">
                    <input type="hidden" name="id" id="id2">
                    <div class="form-group">
                        <input class="form-control" name="flag" type="text" placeholder="标记">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <input type="submit" class="btn btn-primary">
                </div>
            </form>
        </div>
    </div>
</div>

<script>
    function update2(id) {
        $("#id2").val(id);
        $("#model2").modal("show");
    }
</script>
</body>
</html>

